-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: better ingestion timestamp warning #27122
base: master
Are you sure you want to change the base?
Conversation
@@ -148,6 +153,8 @@ export class ReplayEventsIngester { | |||
isValid: asDate.isValid, | |||
daysFromNow: Math.round(Math.abs(asDate.diffNow('day').days)), | |||
processingTimestamp: DateTime.now().toISO(), | |||
eventTypes, | |||
customEvents, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these all have small controlled payloads we create so are safe to capture here
type: event.type, | ||
timestamp: event.timestamp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will hopefully let me spot any patterns in the bad data, and figure out how I can safely capture a custom event instead of dropping here
@@ -138,6 +138,11 @@ export class ReplayEventsIngester { | |||
if (replayRecord !== null) { | |||
const asDate = DateTime.fromSQL(replayRecord.first_timestamp) | |||
if (!asDate.isValid || Math.abs(asDate.diffNow('day').days) >= 7) { | |||
const eventTypes = rrwebEvents.map((event) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two loops over what could potentially be arrays with 1000s of entries? Given how sensitive blobby is to cpu work, maybe we could:
- Do this in one loop rather than a map and filter
- Wait till after christmas to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- fair
- definitely!
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
we reject replay messages if the
first_timestamp
is invalidbut in some cases the
last_timestamp
is validwe see this consistently (but at least at a very very low rate). if you have a very short session we might be dropping the only message we see for that session.
i'd like to capture a custom event into the recording instead of totally dropping the payload or we have no way of diagnosing what is happening
i want to capture a little more information since from what i have i can't quite figure out the safe way to capture the event
NB I won't merge this until 6th Jan regardless, since i'm not really working